﻿<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  	<script type="text/javascript" src="../js/jquery-1.8.2.js"></script>
  </head>
  <body>
	
	<table border="1" align="center">
	  <tr style="display:none">
	  	<td>Value 1</td>
	  </tr>
	  <tr>
	  	<td>Value 2</td>
	  </tr>
	  <tr>
	  	<td>Value 3</td>
	  </tr>
	</table>
	
	<script type="text/javascript">
		//1)查找隐藏的tr元素的个数
		//alert( $("table tr:hidden").size() );
		console.log($("table tr:hidden").size());
		
  		//2)查找所有可见的tr元素的个数
		//alert( $("table tr:NOT(:hidden)").size() );
//		alert( $("table tr:visible").size() );//提倡
		console.log($("table tr:visible").size());
	</script>
	
  </body>
</html> 





